<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">


    <title>H+ 后台主题UI框架 - 数据表格</title>
    <meta name="keywords" content="H+后台主题,后台bootstrap框架,会员中心主题,后台HTML,响应式后台">
    <meta name="description" content="H+是一个完全响应式，基于Bootstrap3最新版本开发的扁平化主题，她采用了主流的左右两栏式布局，使用了Html5+CSS3等现代技术">

    <link rel="shortcut icon" href="favicon.ico">
    <link href="css/bootstrap.min.css?v=3.3.5" rel="stylesheet">
    <link href="css/font-awesome.min.css?v=4.4.0" rel="stylesheet">

    <!-- Data Tables -->
    <link href="css/plugins/dataTables/dataTables.bootstrap.css" rel="stylesheet">
    <link href="css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
    <link href="css/animate.min.css" rel="stylesheet">
    <link href="css/style.min.css?v=4.0.0" rel="stylesheet">
    <link href="css/plugins/sweetalert/sweetalert.css" rel="stylesheet">
    <link href="css/main.css" rel="stylesheet">

</head>

<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>服务包
                        <small>信息</small>
                    </h5>
                </div>
                <div class="ibox-content">
                    <div class="row row-lg">
                        <div class="col-sm-12">
                            <button class="btn btn-info btn-sm" data-toggle="modal"
                                    data-target="#createApiPackageModal">新增服务包
                            </button>
                            <button type="button" id="detailButton" class="btn btn-primary btn-sm">配置服务包
                            </button>
                        </div>
                        <div class="example">
                            <table id="apiPackageListTable"
                                   class="table table-striped table-bordered table-hover"></table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>


<div class="modal fade" id="createApiPackageModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
     aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                    &times;
                </button>
                <h4 class="modal-title" id="myModalLabel">
                    服务包信息
                </h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal" id="form_data">
                    <div class="form-group">
                        <label for="apipackageName" class="col-sm-3 control-label">服务包名</label>
                        <div class="col-sm-9">
                            <input type="text" class="form-control" id="apipackageName"
                                   name="apipackageName" value=""
                                   placeholder="请输入服务包名">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="term" class="col-sm-3 control-label">有效时长(s)</label>
                        <div class="col-sm-9">
                            <input type="text" class="form-control" id="term"
                                   name="term" value=""
                                   placeholder="请输入使用时长">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="price" class="col-sm-3 control-label">价格(元)</label>
                        <div class="col-sm-9">
                            <input type="text" class="form-control" id="price"
                                   name="price" value=""
                                   placeholder="请输入价格">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="descriptionDoc" class="col-sm-3 control-label">描述文档</label>
                        <div class="col-sm-9">
                            <input type="text" class="form-control" id="descriptionDoc"
                                   name="descriptionDoc" value=""
                                   placeholder="请输入相关文档地址">
                        </div>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">关闭
                        </button>
                        <button type="button" class="btn btn-primary" onclick="createApiPackage()">
                            提交
                        </button>
                        <span id="tip"> </span>
                    </div>
                </form>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
    <!--</form>-->
</div>
<div class="modal fade bs-example-modal-lg" id="detailApiPackageModal" tabindex="-1" role="document"
     aria-labelledby="detailApiPackageModalLabel"
     aria-hidden="true">
    <div class="modal-dialog" role="document">
        <div class="modal-content modal-custom">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                    &times;
                </button>
                <h4 class="modal-title" id="detailApiPackageModalLabel">
                    服务包详情信息
                </h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal" id="apipackage_form_data">
                    <div class="col-md-6">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">ID</label>
                            <div class="col-sm-9">
                                <input type="text" id="api_packageId" name="api_packageId" class="form-control"
                                       readonly/>
                            </div>
                        </div>
                    </div>
                    <div class="col-md-6">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">名称</label>
                            <div class="col-sm-9">
                                <input type="text" id="api_packageName" name="api_packageName" class="form-control"
                                       readonly/>
                            </div>
                        </div>
                    </div>
                    <div class="ibox-content">
                        <p>
                            <!--<button type="button" id="batchAddButton" class="btn btn-primary">添加API</button>-->
                            <!--<button type="button" id="batchApisButton" class="btn btn-danger">删除已绑定API</button>-->
                        </p>
                    </div>
                    <div class="col-md-12">
                        <div class="panel panel-default">
                            <div class="panel-heading">已关联的API列表</div>
                            <div class="panel-body">
                                <div class="col-md-2">
                                    <button type="button" id="batchDeleteApisButton" class="btn btn-danger">解绑API</button>
                                </div>
                                <div class="example">
                                    <table id="apisTable" data-mobile-responsive="true">
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="col-md-12">
                        <div class="panel panel-default">
                            <div class="panel-heading">新增的API列表</div>
                            <div class="panel-body">
                                <div class="col-md-2">
                                    <button type="button" id="batchAddApisButton" class="btn btn-primary">添加API</button>
                                </div>
                                <div class="example">
                                <table id="addApisTable" data-mobile-responsive="true">
                                </table>
                                </div>
                            </div>
                        </div>
                    </div>
                </form>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭
                    </button>
                    <button type="button" class="btn btn-primary" onclick="saveApiPackage()">
                        保存更改
                    </button>
                </div>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
    <!--</form>-->
</div>


<div class="modal fade bs-example-modal-lg" id="apisModal" tabindex="-1" role="document"
     aria-labelledby="detailApiPackageModalLabel"
     aria-hidden="true">
    <div class="modal-dialog" role="document">
        <div class="modal-content modal-custom">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                    &times;
                </button>
                <h4 class="modal-title" id="apisModalLabel">
                    API列表
                </h4>
            </div>
            <div class="modal-body">
                <div class="col-md-12">
                    <div class="panel panel-default">
                        <div class="panel-body">
                            <table id="allApisTable" data-mobile-responsive="true">
                            </table>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭
                    </button>
                    <button type="button" class="btn btn-primary" onclick="addApisButton()">
                        确认
                    </button>
                </div>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
    <!--</form>-->
</div>

<div class="modal fade" id="serviceModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
     aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                    &times;
                </button>
                <h4 class="modal-title" id="serviceModalLabel">
                    服务信息
                </h4>
            </div>
            <div class="modal-body">
                <div class="example">
                    <table id="serviceTable" data-mobile-responsive="true">
                    </table>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭
                </button>
                <button type="button" class="btn btn-primary" onclick="confirm_service()">
                    确认
                </button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
    <!--</form>-->
</div>
<script src="js/jquery.min.js?v=2.1.4"></script>
<script src="js/bootstrap.min.js?v=3.3.5"></script>
<script src="js/plugins/jeditable/jquery.jeditable.js"></script>
<script src="js/plugins/dataTables/jquery.dataTables.js"></script>
<script src="js/plugins/dataTables/dataTables.bootstrap.js"></script>
<script src="js/plugins/bootstrap-table/bootstrap-table.min.js"></script>
<script src="js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script>
<script src="js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
<script src="js/content.min.js?v=1.0.0"></script>
<script src="js/plugins/sweetalert/sweetalert.min.js"></script>
<script src="js/application/apipackage/apipackage.js"></script>
<script type="text/javascript" src="http://tajs.qq.com/stats?sId=9051096" charset="UTF-8"></script>

</body>

</html>